<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="root">

</div>
<script>
    let num = prompt("输出n项的Fibonacci sequence数列")

    function Fibonacci_sequence(n) {
        let fib = [1, 1];
        for (let i = 2; i < n; i++) {
            fib[i] = fib[i - 1] + fib[i - 2]
        }
        root.innerHTML = fib + ""
    }

    Fibonacci_sequence(num)
</script>
</body>
</html>